<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Launch countdown example</title>
    <style>

    </style>
  </head>
  <body>


    <script>

    let i = 10;

    while(i >= 0) {
      const para = document.createElement('p');
      if(i === 10) {
        para.textContent = 'Countdown ' + i;
      } else if(i === 0) {
        para.textContent = 'Blast off!';
      } else {
        para.textContent = i;
      }

      document.body.appendChild(para);

      i--;
    }
      
    </script>

  </body>
</html>
